package com.coder.oj.system.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author Bosen 2022/11/25 17:15
 **/
@Data
public class CommitVo implements Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("样例id")
    private Long id;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("题目id")
    private Long problemId;

    @ApiModelProperty("语言（1java，2cpp，3php）")
    private Integer language;

    @ApiModelProperty("运行内存")
    private Long memo;

    @ApiModelProperty("运行时间")
    private Long time;

    @ApiModelProperty("运行代码")
    private String code;

    @ApiModelProperty("错误原因")
    private String error;

    @ApiModelProperty("状态（1AC,2WA,3CE,4TLE,5MLE）")
    private Integer status;

    @ApiModelProperty("创建人")
    private String createBy;

    @ApiModelProperty("更新人")
    private String updateBy;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
}
